﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/MasterPage/User.Master"
    CodeBehind="AdvertiseNew.aspx.vb" Inherits="GoodAnotApp.AdvertiseNew" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script>

        $(function () {
            $("#tabs").tabs();
        });
    </script>
    <%--    <script src="Scripts/bootstrap-twipsy.js" type="text/javascript"></script>
    <script src="Scripts/bootstrap-popover.js" type="text/javascript"></script>--%>
    <script src="Scripts/bootstrap-twipsy.js" type="text/javascript"></script>
    <script src="Scripts/bootstrap-popover.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="tabs" style="width: 1000px">
        <ul>
            <li><a href="#tabs-1">Search Engine Optimization</a></li>
            <li><a href="#tabs-2">Home Page Banner</a></li>
        </ul>
        <div id="tabs-1" style="width: 950px">
            <table style="width: 100%">
                <tr>
                    <td width="100%" colspan="2">
                        <b style="color: #fe9901;">Step 1. Select Branches for search optimization</b>
                    </td>
                </tr>
                <tr>
                    <td width="60%">
                        Search :
                        <asp:TextBox ID="tbxSearch" runat="server"></asp:TextBox>
                        <asp:Button ID="btnSearch" Style="margin-left: 15px" class="btn primary" runat="server"
                            Text="Button" />
                    </td>
                    <td width="40%">
                        Selected branches:
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:UpdatePanel ID="updatePnlSearchResult" runat="server">
                            <ContentTemplate>
                                <asp:Panel ID="pnlSearchResult" Style="height: auto" runat="server">
                                    <asp:ListView ID="lvSearchResults" runat="server" DataSourceID="SqlDataSourceSearchResult">
                                        <EmptyDataTemplate>
                                            <span>No data was returned.</span>
                                        </EmptyDataTemplate>
                                        <ItemTemplate>
                                            <span style="">
                                                <asp:LinkButton ID="lbName" rel="popover" data-content='<%# Eval("details") %>' data-original-title='<%# Eval("category") %>'
                                                    Style="color: blue" Text='<%# string.concat(Eval("name")," - ", Eval("outletName")) %>'
                                                    runat="server" />
                                                                                                 
                                                <asp:Label ID="priorityLabel" Visible="false" runat="server" Text='<%# Eval("priority") %>' />
                                            </span>
                                            <br />
                                        </ItemTemplate>
                                        <LayoutTemplate>
                                            <div id="itemPlaceholderContainer" runat="server" style="">
                                                <span runat="server" id="itemPlaceholder" style="margin-top: 5px" />
                                            </div>
                                            <div style="">
                                            </div>
                                        </LayoutTemplate>
                                        <SelectedItemTemplate>
                                            <span style="">name:
                                                <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' />
                                                <br />
                                                outletName:
                                                <asp:Label ID="outletNameLabel" runat="server" Text='<%# Eval("outletName") %>' />
                                                <br />
                                                category:
                                                <asp:Label ID="categoryLabel" runat="server" Text='<%# Eval("category") %>' />
                                                <br />
                                                details:
                                                <asp:Label ID="detailsLabel" runat="server" Text='<%# Eval("details") %>' />
                                                <br />
                                                priority:
                                                <asp:Label ID="priorityLabel" runat="server" Text='<%# Eval("priority") %>' />
                                                <br />
                                                <br />
                                            </span>
                                        </SelectedItemTemplate>
                                    </asp:ListView>
                                    <asp:SqlDataSource ID="SqlDataSourceSearchResult" runat="server" ConnectionString="<%$ ConnectionStrings:yijungoodAnotDBConnectionString %>"
                                        SelectCommand="SELECT DISTINCT business.name, outlet.name AS outletName, business.category, business.details, outlet.priority FROM business INNER JOIN outlet ON business.business_ID = outlet.business_ID WHERE (business.name LIKE '%' + @search + '%') OR (outlet.name LIKE '%' + @search + '%')">
                                        <SelectParameters>
                                            <asp:ControlParameter ControlID="tbxSearch" Name="search" PropertyName="Text" />
                                        </SelectParameters>
                                    </asp:SqlDataSource>
                                </asp:Panel>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="btnSearch" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </td>
                    <td>
                    </td>
                </tr>
            </table>
        </div>
        <div id="tabs-2">
            <p>
                Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra
                massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget
                luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean
                aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent
                in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat
                nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque
                convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod
                felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.</p>
        </div>
    </div>
    <script type="text/javascript">
        (function () {
            $("[rel=popover]").popover({ offset: 5, live: true });
        })(); 
    </script>
</asp:Content>
